[XEN] gnttab: Initialise maptrack->flags
authorssmith@weybridge.uk.xensource.com <ssmith@weybridge.uk.xensource.com>
Wed, 6 Sep 2006 12:16:02 +0000 (13:16 +0100)
committerssmith@weybridge.uk.xensource.com <ssmith@weybridge.uk.xensource.com>
Wed, 6 Sep 2006 12:16:02 +0000 (13:16 +0100)
commite7e0c88d8c7f316d65f7fd099f5d47076b4bce34
tree11de118d007a5d1c9f825196375634b5fccb5421
parentc2a28ee6acc69aef35e02a348dbcb3e1bd28a9bc
[XEN] gnttab: Initialise maptrack->flags

__gnttab_unmap_grant_ref verifies the validity of the handle by
checking it against maptrack_limit and making sure that the flags
field at the given handle is non-zero.

This means that the flags of an unused handle should be zero in
order to prevent unused handles from getting past this check.

However, we don't seem to set it to zero to begin with when we
allocate the maptrack table.  This could potentially lead to the
corruption of the other domain's internal state, and/or the hypervisor's
internal state.

This patch makes sure that it is zeroed.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
xen/common/grant_table.c